package com.yhy.wxzn.wcs.device.rgv.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;



public enum RgvProgress {
    /**
     * 任务等待分配车辆
     */
    NOT_ASSIGNED_TO_RGV(0, "等待分配车辆"),

    /**
     * 任务已分配给小车
     */
    ASSIGNED_TO_RGV(20, "已分配车辆"),
    /**
     * 小车开始执行
     */
    RGV_TO_RUN(30, "车辆开始执行"),
    /**
     * 小车前往起点中
     */
    RGV_TO_START(31, "前往起点中"),

    /**
     * 小车前往终点中
     */
    RGV_TO_END(59, "前往终点中"),

    /**
     * 小车任务完成
     */
    RGV_COMPLETE(100, "车辆调度完成");
    @EnumValue
    private int taskProgress;
    @JsonValue
    private String description;

    RgvProgress(int taskProgress, String description) {
        this.taskProgress = taskProgress;
        this.description = description;
    }

    public int getTaskProgress() {
        return taskProgress;
    }

    public String getDescription() {
        return description;
    }

    public boolean eq(RgvProgress rgvProgress){
        return this.taskProgress == rgvProgress.getTaskProgress();
    }
    public boolean ne(RgvProgress rgvProgress){
        return this.taskProgress != rgvProgress.getTaskProgress();
    }
    public boolean gt(RgvProgress rgvProgress){
        return this.taskProgress > rgvProgress.getTaskProgress();
    }
    public boolean ge(RgvProgress rgvProgress){
        return this.taskProgress <= rgvProgress.getTaskProgress();
    }
    public boolean lt(RgvProgress rgvProgress){
        return this.taskProgress < rgvProgress.getTaskProgress();
    }
    public boolean le(RgvProgress rgvProgress){
       return this.taskProgress <= rgvProgress.getTaskProgress();
    }


}
